<div id="pageContainer">
<div id="pinlei">
<div class="topRight">&nbsp;</div>
<div class="topContent">品类</div>
<div class="topRight">&nbsp;</div>
<div class="clear"></div>

<?php
	$obj = $this->obj[0];
	$id = $obj->id;
	$logo = $obj->logo;
	$clientname = $obj->shopname;
	$contact = $obj->contact;
	
	echo '<div class="clear"></div>';
	echo '<input type="hidden" id="shopid" value="'.$id.'">';
	echo '<input type="hidden" id="custid" value="'.$obj->cust_id.'">';
	echo '<input type="hidden" id="etime" value="'.$obj->etime.'">';
	echo '<input type="hidden" id="stime" value="'.$obj->stime.'">';
?>

<div class="sk_left"  style="overflow:auto;overflow-x:hidden;">
	<ul>
		<?php 
			$start_tag = 0;
			if(!empty($this->arr_saleList)){
				echo '
					<li class="leftli" onclick="javascript:brandHelper(this);return false;" brid="-1">特价促</li></a>
				';
				$start_tag=-1;
				$brand = $this->arr_brand;
				foreach($brand as $k=>$b){
					echo '
						<li class="leftli" onclick="javascript:brandHelper(this);return false;" brid="'.$k.'">'.$b.'</li>
					';
				}
			}else{
				$brand = $this->arr_brand;
				foreach($brand as $k=>$b){
					echo '
						<li class="leftli" onclick="javascript:brandHelper(this);return false;" brid="'.$k.'">'.$b.'</li>
					';
				}
				foreach($brand as $k=>$b){
					$start_tag = $k;
					break;
				}
			}
		?>
	</ul>
</div>
<div class="sk_right">
	<div class="sk_right_name"></div>
	<input type="hidden" class="hid" value="<?php echo $this->bid;?>">

<?php 
	$arr_productList = $this->arr_productList;
if(!empty($this->arr_saleList)){
	echo '<div class="sk_right_skus"  style="overflow:auto;overflow-x:hidden;" tag="-1">';
	foreach($this->arr_saleList as $r){
		if ($r->onsale == 0)
			continue;
		$start_tag = -1;
		 echo '
			<div id="pro-'.$r->skuid.'-0" skuName="'.$r->skuname.'" skuOnsale="'.$r->onsale.'" skuPrice="';
				if($r->onsale==0){
					echo $r->price;
				}if($r->onsale==1){
					echo $r->saleprice;
				}
			echo'" skuWeight="'.$r->spec.'" skuSaleAmount="'.$r->saleamount.'">
			<div class="sk_cai_left">';
			if($r->onsale==0){
				echo '<img src="'.$r->imgurl.'">';
			}if($r->onsale==1){
				echo '<div class="index_cujiao_div"><img style="width:100%;height:75%;" src="'.$r->imgurl.'"/><img class="index_cujiao" style="width:20px;height:20px;" src="/images/cu.png"/></div>';
			}	
		echo'</div>
			<div class="sk_cai_right">
				<input class="id" type="hidden" value="'.$r->skuid.'">
				<div class="sk_cai_name">'.$r->skuname.'</div>
				<div class="sk_num_left">
					<p class="sk_avg">'.$r->spec.'</p>';
					if($r->onsale==0){
						echo '<p class="sk_price">'.$r->price.'</p>';
					}if($r->onsale==1){
						echo '<p class="sk_price">'.$r->saleprice.'</p><p style="text-decoration:line-through;color:#919191;font-size:0.8em;">'.$r->price.'</p>';
					}
				echo '</div>
				<div class="sk_num_right">
					<div class="jiajian">
						<span class="minus"  skuId="'.$r->skuid.'" custId="0">-</span>
						<span class="text_box request-amount"  id="sku-'.$r->skuid.'-0">0</span>
						<span class="add"  skuId="'.$r->skuid.'" custId="0">+</span>
					</div>
				</div>
			</div>
			<div class="clear"></div>
			<hr class="hrcss">
		</div>
		'; 
	}
	echo '</div>';
}
	foreach($arr_productList as $k=>$re){
		echo '<div class="sk_right_skus"  style="overflow:auto;overflow-x:hidden;" tag='.$k.'>';
			foreach($re as $r){
			
			 echo '
				<div id="pro-'.$r->skuid.'-0" skuName="'.$r->skuname.'" skuOnsale="'.$r->onsale.'" skuPrice="';
					if($r->onsale==0){
						echo $r->price;
					}if($r->onsale==1){
						echo $r->saleprice;
					}
				echo'" skuWeight="'.$r->spec.'">
				<div class="sk_cai_left">';
				if($r->onsale==0){
					echo '<img src="'.$r->imgurl.'">';
				}if($r->onsale==1){
					echo '<div class="index_cujiao_div"><img style="width:90%;height:75%;" src="'.$r->imgurl.'"/><img class="index_cujiao" style="width:26px;height:26px;" src="/images/cujiao.png"/></div>';
				}	
			echo'</div>
				<div class="sk_cai_right">
					<input class="id" type="hidden" value="'.$r->skuid.'">
					<div class="sk_cai_name">'.$r->skuname.'</div>
					<div class="sk_num_left">
						<p class="sk_avg">'.$r->spec.'</p>';
						if($r->onsale==0){
							echo '<p class="sk_price">'.$r->price.'</p>';
						}if($r->onsale==1){
							echo '<p class="sk_price">'.$r->saleprice.'</p><p style="text-decoration:line-through;color:#919191;font-size:0.8em;">'.$r->price.'</p>';
						}
					echo '</div>
					<div class="sk_num_right">
						<div class="jiajian">
							<span class="minus"  skuId="'.$r->skuid.'" custId="0">  -  </span>
							<span class="text_box request-amount"  id="sku-'.$r->skuid.'-0">0</span>
							<span class="add"  skuId="'.$r->skuid.'" custId="0"> +  </span>
						</div>
					</div>
				</div>
				<div class="clear"></div>
				<hr class="hrcss">
			</div>
			'; 
			}
		echo '</div>';
	}
?>
</div>
<div class="clear"></div>
</div>
<!--<div class="shopping_cart" style="z-index:1050;">
	<span class="cart_bg"><span class="cart_num" id="cart_num">0</span></span>
	<span class="cart_total"><span style="top:0px;" id="cart_total">0</span>元</span>
	<input type="hidden" value="<?php echo $this->siteid;?>" id="siteid">
	<input type="hidden" id="mindeliver" value="<?php echo $obj->mindeliver;?>">
	<span class="goto">
		<span class="cha">差<span class="cha_money"><?php echo $obj->mindeliver;?></span>元起订</span>
	</span>
</div>
<div id="shoppingCart">
	<div style="margin-right:5px;cursor:pointer;font-size:30px;margin-bottom:10px;border-bottom:1px solid ECECEC;" id="closeBtn"><span style="font-size:20px;color:#FF502F;">购物车</span><span style="float:right;">×</span></div>
	<div style="overflow:scroll;overflow-x:hidden;">
	<table class="cart_list">
	</table>
	<div class="clear_cart">清空购物车</div>
	</div>
</div>-->
</div>
<div class="index_bottom">
	<ul class="ul_hen">
		<a href="/"><li>首页</li></a>
		<a href="javascript:void(0);" onclick="javascript:category();return false;"><li>品类</li></a>
		<a href="javascript:void(0);" onclick="javascript:personalHandler();return false;"><li>我的</li></a>
		<li style="padding-top:0px;margin-top:5px;" onclick="javascript:toCart();return false;">
			<span class="cart_bg"><span class="cart_num" id="cart_num">0</span></span>
		</li>
	</ul>
</div>
<script type="text/javascript">
$(document).ready(function() {
	$('.sk_right_skus').hide();
	var start_name = $('.leftli[brid=<?php echo $start_tag?>]').html();
	$('.sk_right_skus[tag=<?php echo $start_tag?>]').show();
	$('.leftli[brid=<?php echo $start_tag?>]').addClass('left_li');
	var right_top = $('.sk_right_name').offset().top;
	var name_top = 0;
	var jiesuan_height = $('.shopping_cart').height();
	var right_height = document.documentElement.clientHeight-right_top-jiesuan_height-name_top;
	$('.sk_right_skus').css('height',right_height);
	var left_height=document.documentElement.clientHeight-right_top-jiesuan_height;
	$('.sk_left').css('height',left_height);
	
	loadCookie(0);
	init_cart_btns();
});
</script>
 <script language="JavaScript" type="text/javascript">
    var id;
    var count =0;
    window.onload=function(){
        id = window.setInterval("Do()",1000*60*30);
    }
    function Do()
    {
		window.location.href=window.location.href;
    }
    function Stop()
    {
        window.clearInterval(id);
    }
    function Start()
    {
        id = window.setInterval("Do()",1000);
    }
</script>